package chapter12;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2019/3/11 14:16
 */
public class ExceptionMethods {
    public static void main(String[] args) {
        try {
            throw new Exception("my exception");
        } catch (Exception e) {
            System.out.println("getMessage:" + e.getMessage());
            System.out.println("getLocalizedMessage: " + e.getLocalizedMessage());
            System.out.println("toString" + e);
            System.out.println("printStackTrace");
            e.printStackTrace();
        }
    }
}
